package idiet.bean;

import java.io.Serializable;
import javax.persistence.*;
import java.util.List;


/**
 * The persistent class for the meal_family database table.
 * 
 */
@Entity
@Table(name="meal_family")
public class MealFamily implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	private int id;

	private String comment;

	private String name;

	//bi-directional many-to-one association to CustomerNurseMeal
	@OneToMany(mappedBy="mealFamily")
	private List<CustomerNurseMeal> customerNurseMeals;

	//bi-directional many-to-one association to Meal
	@OneToMany(mappedBy="mealFamily")
	private List<Meal> meals;

	//bi-directional many-to-one association to MealFamily
	@ManyToOne
	@JoinColumn(name="parent_id")
	private MealFamily parentMealFamily;

	//bi-directional many-to-one association to MealFamily
	@OneToMany(mappedBy="parentMealFamily")
	private List<MealFamily> childMealFamilies;

	public MealFamily() {
	}

	public int getId() {
		return this.id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getComment() {
		return this.comment;
	}

	public void setComment(String comment) {
		this.comment = comment;
	}

	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public List<CustomerNurseMeal> getCustomerNurseMeals() {
		return this.customerNurseMeals;
	}

	public void setCustomerNurseMeals(List<CustomerNurseMeal> customerNurseMeals) {
		this.customerNurseMeals = customerNurseMeals;
	}

	public List<Meal> getMeals() {
		return this.meals;
	}

	public void setMeals(List<Meal> meals) {
		this.meals = meals;
	}

	public MealFamily getParentMealFamily() {
		return parentMealFamily;
	}

	public void setParentMealFamily(MealFamily parentMealFamily) {
		this.parentMealFamily = parentMealFamily;
	}

	public List<MealFamily> getChildMealFamilies() {
		return childMealFamilies;
	}

	public void setChildMealFamilies(List<MealFamily> childMealFamilies) {
		this.childMealFamilies = childMealFamilies;
	}

}